<?php

/*
Copyright 2005-2011 Textpattern CMS Project
All Rights Reserved.

This file is part of Textpattern.

Textpattern is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

if (!defined('txp'))
{
	header('HTTP/1.1 403 Forbidden');
	exit('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You don\'t have permission to access the requested resource on this server.</p></body></html>');
}

class _PresentationController extends TXPAdminController
{
	//---------------------------------------------------------------------------

	// Public Methods
	
	//---------------------------------------------------------------------------

	public function __construct()
	{
		parent::__construct();
	}

	//---------------------------------------------------------------------------

	public function action_index($params)
	{
		$this->redirect('/presentation/pages');
	}

	//---------------------------------------------------------------------------

	public function action_sections($params)
	{
		$this->getCommonVars($vars);
		$vars['selected_subtab'] = 'sections';
		$vars['body_css_id'] = 'page-section';

		$this->render('default', $vars);
	}

	//---------------------------------------------------------------------------

	public function action_pages($params)
	{
		$this->getCommonVars($vars);
		$vars['selected_subtab'] = 'pages';
		$vars['body_css_id'] = 'page-page';

		$this->render('default', $vars);
	}

	//---------------------------------------------------------------------------

	public function action_forms($params)
	{
		$this->getCommonVars($vars);
		$vars['selected_subtab'] = 'forms';
		$vars['body_css_id'] = 'page-form';

		$this->render('default', $vars);
	}

	//---------------------------------------------------------------------------

	public function action_style($params)
	{
		$this->getCommonVars($vars);
		$vars['selected_subtab'] = 'style';
		$vars['body_css_id'] = 'page-css';

		$this->render('default', $vars);
	}

	//---------------------------------------------------------------------------

	protected function getCommonVars(&$vars)
	{
		parent::getCommonVars($vars);
		$vars['selected_tab'] = 'presentation';
		$vars['body_css_class'] = 'presentation';
	}

	//---------------------------------------------------------------------------

}
